package twentytwenty;

/**
 * @Author: Zahi
 * @Description:
 * @Date Created in 2020-12-05 12:36
 * @Modified By:
 */
public class ConvertToTitle_168 {
    public static void main(String [] args){
        System.out.println(convertToTitle(701));
    }

    public static String convertToTitle(int n) {
        StringBuilder stringBuilder = new StringBuilder();
        while (n != 0) {
            n--;
            stringBuilder.append((char) ('A' + n % 26));
            n /= 26;
        }
        return stringBuilder.reverse().toString();
    }
}
